package com.liarjo.mywebsiteapi.admin.controller.messageBoard;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.liarjo.mywebsiteapi.admin.controller.messageBoard.page.MessageBoardPageRequest;
import com.liarjo.mywebsiteapi.admin.controller.messageBoard.page.MessageBoardPageResult;

@RestController
@RequestMapping("/api/admin/message-board")
public class MessageBoardController {
    @Autowired
    private MessageBoardService messageBoardService;

    @GetMapping("/page")
    public IPage<MessageBoardPageResult> page(MessageBoardPageRequest messageBoardPageRequest) {
        return messageBoardService.page(messageBoardPageRequest);
    }
}
